int _t_o_p_B_e_v_e_l (in) Non-zero means this bevel forms the|
top side of the object; zero means|
it forms the bottom side.
int _w_h_i_c_h (in) Specifies which of the border's |
graphics contexts is desired. Must|
be TK_3D_FLAT_GC, TK_3D_LIGHT_GC, |
or TK_3D_DARK_GC.
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
These procedures provide facilities for drawing window borders in a way
that produces a three-dimensional appearance. TTTTkkkk____GGGGeeeetttt3333DDDDBBBBoooorrrrddddeeeerrrr allocates
colors and Pixmaps needed to draw a border in the window given by the
_t_k_w_i_n argument. The _c_o_l_o_r_N_a_m_e argument indicates what colors should be
used in the border. _C_o_l_o_r_N_a_m_e may be any value acceptable to
TTTTkkkk____GGGGeeeettttCCCCoooolllloooorrrr. The color indicated by _c_o_l_o_r_N_a_m_e will not actually be used
in the border; it indicates the background color for the window (i.e. a
color for flat surfaces). The illuminated portions of the border will
appear brighter than indicated by _c_o_l_o_r_N_a_m_e, and the shadowed portions of
the border will appear darker than _c_o_l_o_r_N_a_m_e.
TTTTkkkk____GGGGeeeetttt3333DDDDBBBBoooorrrrddddeeeerrrr returns a token that may be used in later calls to
TTTTkkkk____DDDDrrrraaaawwww3333DDDDRRRReeeeccccttttaaaannnngggglllleeee. If an error occurs in allocating information for the
border (e.g. _c_o_l_o_r_N_a_m_e isn't a legal color specifier), then NULL is
returned and an error message is left in _i_n_t_e_r_p->_r_e_s_u_l_t.
Once a border structure has been created, TTTTkkkk____DDDDrrrraaaawwww3333DDDDRRRReeeeccccttttaaaannnngggglllleeee may be
invoked to draw the border. The _t_k_w_i_n argument specifies the window for |
which the border was allocated, and _d_r_a_w_a_b_l_e specifies a window or pixmap
in which the border is to be drawn. _D_r_a_w_a_b_l_e need not refer to the same
window as _t_k_w_i_n, but it must refer to a compatible pixmap or window: one
associated with the same screen and with the same depth as _t_k_w_i_n. The _x,
_y, _w_i_d_t_h, and _h_e_i_g_h_t arguments define the bounding box of the border
region within _d_r_a_w_a_b_l_e (usually _x and _y are zero and _w_i_d_t_h and _h_e_i_g_h_t are
the dimensions of the window), and _b_o_r_d_e_r_W_i_d_t_h specifies the number of
pixels actually occupied by the border. The _r_e_l_i_e_f argument indicates
which of several three-dimensional effects is desired: TK_RELIEF_RAISED
means that the interior of the rectangle should appear raised relative to
the exterior of the rectangle, and TK_RELIEF_SUNKEN means that the
interior should appear depressed. TK_RELIEF_GROOVE and TK_RELIEF_RIDGE
mean that there should appear to be a groove or ridge around the exterior
of the rectangle.
TTTTkkkk____FFFFiiiillllllll3333DDDDRRRReeeeccccttttaaaannnngggglllleeee is somewhat like TTTTkkkk____DDDDrrrraaaawwww3333DDDDRRRReeeeccccttttaaaannnngggglllleeee except that it
first fills the rectangular area with the background color (one
corresponding to the _c_o_l_o_r_N_a_m_e used to create _b_o_r_d_e_r). Then it calls
TTTTkkkk____DDDDrrrraaaawwww3333DDDDRRRReeeeccccttttaaaannnngggglllleeee to draw a border just inside the outer edge of the
rectangular area. The argument _r_e_l_i_e_f indicates the desired effect
(TK_RELIEF_FLAT means no border should be drawn; all that happens is to
The procedure TTTTkkkk____DDDDrrrraaaawwww3333DDDDPPPPoooollllyyyyggggoooonnnn may be used to draw more complex shapes
with a three-dimensional appearance. The _p_o_i_n_t_P_t_r and _n_u_m_P_o_i_n_t_s
arguments define a trajectory, _p_o_l_y_B_o_r_d_e_r_W_i_d_t_h indicates how wide the
border should be (and on which side of the trajectory to draw it), and
_l_e_f_t_R_e_l_i_e_f indicates which side of the trajectory should appear raised.
TTTTkkkk____DDDDrrrraaaawwww3333DDDDPPPPoooollllyyyyggggoooonnnn draws a border around the given trajectory using the
colors from _b_o_r_d_e_r to produce a three-dimensional appearance. If the
trajectory is non-self-intersecting, the appearance will be a raised or
sunken polygon shape. The trajectory may be self-intersecting, although
it's not clear how useful this is.
TTTTkkkk____FFFFiiiillllllll3333DDDDPPPPoooollllyyyyggggoooonnnn is to TTTTkkkk____DDDDrrrraaaawwww3333DDDDPPPPoooollllyyyyggggoooonnnn what TTTTkkkk____FFFFiiiillllllll3333DDDDRRRReeeeccccttttaaaannnngggglllleeee is to
TTTTkkkk____DDDDrrrraaaawwww3333DDDDRRRReeeeccccttttaaaannnngggglllleeee: it fills the polygonal area with the background
color from _b_o_r_d_e_r, then calls TTTTkkkk____DDDDrrrraaaawwww3333DDDDPPPPoooollllyyyyggggoooonnnn to draw a border around
the area (unless _l_e_f_t_R_e_l_i_e_f is TK_RELIEF_FLAT; in this case no border is
drawn).
The procedures TTTTkkkk____3333DDDDVVVVeeeerrrrttttiiiiccccaaaallllBBBBeeeevvvveeeellll and TTTTkkkk____3333DDDDHHHHoooorrrriiiizzzzoooonnnnttttaaaallllBBBBeeeevvvveeeellll provide |
lower-level drawing primitives that are used by procedures such as |
TTTTkkkk____DDDDrrrraaaawwww3333DDDDRRRReeeeccccttttaaaannnngggglllleeee. These procedures are also useful in their own right |
for drawing rectilinear border shapes. TTTTkkkk____3333DDDDVVVVeeeerrrrttttiiiiccccaaaallllBBBBeeeevvvveeeellll draws a |
vertical beveled edge, such as the left or right side of a rectangle, and|
TTTTkkkk____3333DDDDHHHHoooorrrriiiizzzzoooonnnnttttaaaallllBBBBeeeevvvveeeellll draws a horizontal beveled edge, such as the top or |
bottom of a rectangle. Each procedure takes _x, _y, _w_i_d_t_h, and _h_e_i_g_h_t |
arguments that describe the rectangular area of the beveled edge (e.g., |
_w_i_d_t_h is the border width for TTTTkkkk____3333DDDDVVVVeeeerrrrttttiiiiccccaaaallllBBBBeeeevvvveeeellll). The _l_e_f_t_B_o_r_d_e_r and |
_t_o_p_B_o_r_d_e_r arguments indicate the position of the border relative to the |
``inside'' of the object, and _r_e_l_i_e_f indicates the relief of the inside |
of the object relative to the outside. TTTTkkkk____3333DDDDVVVVeeeerrrrttttiiiiccccaaaallllBBBBeeeevvvveeeellll just draws a |
rectangular region. TTTTkkkk____3333DDDDHHHHoooorrrriiiizzzzoooonnnnttttaaaallllBBBBeeeevvvveeeellll draws a trapezoidal region to |
generate mitered corners; it should be called after TTTTkkkk____3333DDDDVVVVeeeerrrrttttiiiiccccaaaallllBBBBeeeevvvveeeellll |
(otherwise TTTTkkkk____3333DDDDVVVVeeeerrrrttttiiiiccccaaaallllBBBBeeeevvvveeeellll will overwrite the mitering in the corner).|
The _l_e_f_t_I_n and _r_i_g_h_t_I_n arguments to TTTTkkkk____3333DDDDHHHHoooorrrriiiizzzzoooonnnnttttaaaallllBBBBeeeevvvveeeellll describe the |
mitering at the corners; a value of 1 means that the bottom edge of the |
trapezoid will be shorter than the top, 0 means it will be longer. For |
example, to draw a rectangular border the top bevel should be drawn with |
1 for both _l_e_f_t_I_n and _r_i_g_h_t_I_n, and the bottom bevel should be drawn with |
0 for both arguments.
The procedure TTTTkkkk____SSSSeeeettttBBBBaaaacccckkkkggggrrrroooouuuunnnnddddFFFFrrrroooommmmBBBBoooorrrrddddeeeerrrr will modify the background pixel
and/or pixmap of _t_k_w_i_n to produce a result compatible with _b_o_r_d_e_r. For
color displays, the resulting background will just be the color given by
the _c_o_l_o_r_N_a_m_e argument passed to TTTTkkkk____GGGGeeeetttt3333DDDDBBBBoooorrrrddddeeeerrrr when _b_o_r_d_e_r was created;
for monochrome displays, the resulting background will be a light stipple
pattern, in order to distinguish the background from the illuminated
portion of the border.
Given a token for a border, the procedure TTTTkkkk____NNNNaaaammmmeeeeOOOOffff3333DDDDBBBBoooorrrrddddeeeerrrr will return
the _c_o_l_o_r_N_a_m_e string that was passed to TTTTkkkk____GGGGeeeetttt3333DDDDBBBBoooorrrrddddeeeerrrr to create the
The procedure TTTTkkkk____3333DDDDBBBBoooorrrrddddeeeerrrrCCCCoooolllloooorrrr returns the XColor structure that will be
used for flat surfaces drawn for its _b_o_r_d_e_r argument by procedures like
TTTTkkkk____FFFFiiiillllllll3333DDDDRRRReeeeccccttttaaaannnngggglllleeee. The return value corresponds to the _c_o_l_o_r_N_a_m_e passed
to TTTTkkkk____GGGGeeeetttt3333DDDDBBBBoooorrrrddddeeeerrrr. The XColor, and its associated pixel value, will
remain allocated as long as _b_o_r_d_e_r exists.
The procedure TTTTkkkk____3333DDDDBBBBoooorrrrddddeeeerrrrGGGGCCCC returns one of the X graphics contexts that |
are used to draw the border. The argument _w_h_i_c_h selects which one of the|
three possible GC's: TK_3D_FLAT_GC returns the context used for flat |
surfaces, TK_3D_LIGHT_GC returns the context for light shadows, and |
TK_3D_DARK_GC returns the context for dark shadows.
When a border is no longer needed, TTTTkkkk____FFFFrrrreeeeeeee3333DDDDBBBBoooorrrrddddeeeerrrr should be called to
release the resources associated with the border. There should be
exactly one call to TTTTkkkk____FFFFrrrreeeeeeee3333DDDDBBBBoooorrrrddddeeeerrrr for each call to TTTTkkkk____GGGGeeeetttt3333DDDDBBBBoooorrrrddddeeeerrrr.